package com.wzu.zlb.ems.service.impl;



import com.wzu.zlb.ems.dao.UserMapper;
import com.wzu.zlb.ems.pojo.User;
import com.wzu.zlb.ems.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User findUserByCode(String userCode) {
        try {
            return this.userMapper.findUserByCode(userCode);
        } catch (RuntimeException e) {
            e.printStackTrace();
            throw e;
        }

    }



}
